//
//  HTTPManager.h
//  MiBaoTu
//
//  Created by admin on 16/9/20.
//  Copyright © 2016年 com.caesartech15. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^Success)(id json);
typedef void(^Failure)(NSError* error);

@interface HTTPManager : NSObject

@property (nonatomic,assign)UIDeviceOrientation     orientation;
@property (nonatomic,copy)void(^UpdateMusicSendDataBlock)(int bytesSent);//发送数据
@property (nonatomic,copy)void(^UpdateMusicSendFinishBlock)(NSData * data, NSURLResponse * response, NSError * error);//发送完成

+ (HTTPManager *)standerDefault;
- (void)onUpdateMusicWithView:(UIView *)view;

//get/post
- (void)AFGetRequest:(NSString *)urlPath
                view:(UIView *)view
             success:(Success)success
             failure:(Failure)failure;

- (void)AFPostRequest:(NSString *)urlPath
                 view:(UIView *)view
           parameters:(NSDictionary *)parameters
              success:(Success)success
              failure:(Failure)failure;

@end
